#!/bin/bash

#echo 'gohigh@2021' | sudo -S su root
#echo "/home/gohigh/juefx/%e.core.%p" > /proc/sys/kernel/core_pattern
#exit

pids=$(ps aux | grep EventServer | grep -v grep | awk '{print $2}')

for pid in ${pids}
do
    prlimit --pid ${pid}  --core=unlimited:unlimited
    cat /proc/${pid}/limits
    #echo -n 'Max open files=unlimited:unlimited' > /proc/${pid}/limits
done
